package com.shortLinked.project.common.constant;

/**
 * Redis key 常量类
 */
public class RedisKeyConstant {
    /**
     * 短链接跳转前缀 key
     * %s -> 域名 + 短链接
     */
    public static final String GOTO_SHORT_LINK_KEY = "short-link:goto:%s";

    /**
     * 短链接分布式锁前缀 key
     * %s -> 域名 + 短链接
     */
    public static final String LOCK_GOTO_SHORT_LINK_KEY = "short-link:lock:goto:%s";

    /**
     * 短链接请求前缀 key
     * %s -> 域名 + 短链接
     */
    public static final String GOTO_IS_NULL_SHORT_LINK_KEY = "short-link:is-null:goto:%s";

    /**
     * 短链接修改分组前缀 key
     * * %s -> 域名 + 短链接
     */
    public static final String LOCK_GID_UPDATE_KEY = "short-link:lock:update-gid:%s";

    /**
     * 短链接延迟消息统计
     */
    public static final String DELAY_QUEUE_STATS_KEY = "short-link:delay-queue:stats";

    /**
     * 短链接访问统计是否是新用户标识
     */
    public static final String SHORT_LINK_STATS_UV_KEY = "short-link:stats:uv:";

    /**
     * 短链接访问统计是否是新IP标识
     */
    public static final String SHORT_LINK_STATS_UIP_KEY = "short-link:stats:uip:";

    /**
     * 短链接监控统计消息 Topic 缓存标识
     */
    public static final String SHORT_LINK_STATS_STREAM_TOPIC_KEY = "short_link:stats-stream";

    /**
     * 短链接监控统计消息 Group 缓存标识
     */
    public static final String SHORT_LINK_STATS_STREAM_GROUP_KEY = "short_link:stats-stream:only-group";

    /**
     * 分布式锁创建短链接标识
     */
    public static final String SHORT_LINK_CREATE_LOCK_KEY = "short_link:lock:create";
}
